INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/src/stack/
)

SET(STACK_LIB_SOURCES
stack.hpp
stack.cpp
)

SET(STACK_LIB "stack_lib")

ADD_LIBRARY(${STACK_LIB} STATIC ${STACK_LIB_SOURCES})

IF("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" AND CMAKE_COMPILER_IS_GNUCC)
  SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC"  )
  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fPIC"  )
  SET_TARGET_PROPERTIES( stack_lib PROPERTIES COMPILE_FLAGS -fPIC)
ENDIF()
